from fastapi import APIRouter
from fastapi import Depends
from redis.asyncio import Redis
from tortoise import Tortoise

from app.core.database import redis_provider
from app.exception_handlers.CustomExceptionHandler import CustomException
from app.models.usermodel import User

ping_router = APIRouter()

@ping_router.get("/ping",summary="ping测试接口")
async def ping():
    """连通性测试接口"""
    # 测试 tortoise orm 连通性
    await User().create( username="test2",email="<EMAIL2>")
    return {"ping": "pong"}